using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
namespace CueCatDecoderTest
{

    [TestFixture]
    public class Tests
    {
        [Test]
        public void Test1()
        {
            CueCatDecoder.Product output = CueCatDecoder.Decoder.Decode(".C3nZC3nZC3nZE3r0Chr3CNnY.fHmc.C3jWE3nWC3zYCxn6.");
            Assert.AreEqual("013803051209", output.ID);
            Assert.AreEqual(CueCatDecoder.IdType.UPC, output.Type);
        }

        [Test]
        public void Test2()
        {
            CueCatDecoder.Product output = CueCatDecoder.Decoder.Decode(".C3nZC3nZC3nZE3r0Chr3CNnY.cGf2.ENr7CNz6C3z6DxvXChzXD3P6.");
            Assert.AreEqual("978159059662352499", output.BarCode);
            Assert.AreEqual("1590596625", output.ID);
            Assert.AreEqual(CueCatDecoder.IdType.ISBN, output.Type);
        }


        [Test]
        public void Test2a()
        {
            CueCatDecoder.Product output = CueCatDecoder.Decoder.Decode(".C3nZC3nZC3nZE3r0Chr3CNnY.cGf2.ENr7C3n1C3PWD3rYCxzYChnZ.");
            Assert.AreEqual("978006093471251300", output.BarCode);
            Assert.AreEqual("0060934719", output.ID);
            Assert.AreEqual(CueCatDecoder.IdType.ISBN, output.Type);
        }   
        

        [Test]
        public void Test3()
        {
            CueCatDecoder.Product output  = CueCatDecoder.Decoder.Decode(".C3nZC3nZC3nZE3r0Chr3CNnY.fHmc.DhjYDhj6Dhb6ENfZ.");
            Assert.AreEqual("711719739920", output.ID);
            Assert.AreEqual(CueCatDecoder.IdType.UPC, output.Type);

        }


        [Test]
        public void Test4()
        {
            CueCatDecoder.Product output  = CueCatDecoder.Decoder.Decode(".C3nZC3nZC3nZE3r0Chr3CNnY.fHmc.DxT6CxzWDNP1DxfW.");
            Assert.AreEqual("689253596623", output.ID);
            Assert.AreEqual(CueCatDecoder.IdType.UPC, output.Type);
        }

            
            
    }

}